﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MyHotel
{
    public partial class uscNote : UserControl
    {
        private String _nameState;
        private Image _image;

        public String NameState
        {
            get { return _nameState; }
            set
            {
                _nameState = value;
                labelX1.Text = NameState;
            }
        } 

        public Image Image
        {
            get { return _image; }
            set
            {
                _image = value;
                buttonX1.Image = _image;
            }
        }

        public uscNote()
        {
            InitializeComponent();
        }

        private void label_name_TextChanged(object sender, EventArgs e)
        {
            this.Width = (int)(labelX1.Text.Length * labelX1.Font.Size + labelX1.Left);
        }
    }
}
